Skip to content

Исправление расчета стандартной ошибки#8

Merged
Stivo182 merged 2 commits intomainfrom
fix/stderr
May 13, 2025
Merged

Исправление расчета стандартной ошибки#8
Stivo182 merged 2 commits intomainfrom
fix/stderr

Conversation

@Stivo182
Copy link
Owner

@Stivo182 Stivo182 commented May 13, 2025

Summary by CodeRabbit

  • Documentation
    • Updated benchmark results tables across multiple documentation files with revised and more precise numeric values, improved formatting, and updated version numbers.
  • Tests
    • Modified test procedures to separately handle time and memory measurements, updating input formats and table construction logic.
  • Refactor
    • Adjusted internal logic to ensure iteration counts correspond specifically to time measurements.

@coderabbitai
Copy link

coderabbitai bot commented May 13, 2025

Walkthrough

This update revises benchmark result tables across documentation and the README to reflect updated numeric values, improved precision, and minor formatting adjustments. The core statistics code now ensures iteration counts are based on filtered time measurements. Test utilities and cases are refactored to handle time and memory measurements as separate inputs, updating function signatures and table construction accordingly.

Changes

File(s) Change Summary
README.md, docs/БыстрыйСтарт.md, docs/МониторингПамяти.md, docs/Параметризация.md, docs/СортировкаОтчета.md, docs/Эталоны.md Benchmark result tables updated with new numeric values, increased precision, and improved header formatting. Version numbers adjusted where relevant. No changes to structure or explanatory content.
src/BenchmarkOneScript/core/Классы/СтатистикаБенчмарка.os Assignment of iteration count now uses filtered time measurements instead of the full input set. Variable assignment order changed to ensure accuracy. No changes to exported entity signatures.
tests/ТестыСтатистики.os Test utility ТаблицаЗамеров refactored to accept separate time and memory measurement strings. All test cases updated to provide both arguments. Table construction logic rewritten for explicit multi-column output. Function signature changed accordingly.

Sequence Diagram(s)

sequenceDiagram
    participant TestCase
    participant ТаблицаЗамеров
    participant ТаблицаЗначений

    TestCase->>ТаблицаЗамеров: Call with (TimeMeasurements, MemoryMeasurements, Multiplier)
    ТаблицаЗамеров->>ТаблицаЗначений: Create table with columns
    ТаблицаЗамеров->>ТаблицаЗначений: Add rows for each time measurement ("Измерение")
    ТаблицаЗамеров->>ТаблицаЗначений: Add rows for each memory measurement ("Память")
    ТаблицаЗамеров-->>TestCase: Return constructed table
Loading

Poem

Hopping through numbers, I tweak and I test,
Tables now clearer, with data expressed.
Memory and time, each in their own lane,
Precision and order, the goal we attain.
With every new version, the benchmarks delight—
A bunny’s small hop makes the stats just right!
🐇📊✨

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
README.md (1)

97-106: Consider automating table generation.

Maintaining matching tables across multiple Markdown files is error-prone. You might integrate a script or template to pull live benchmark output directly into docs.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec91aec and 69f61a7.

📒 Files selected for processing (8)
  • README.md (1 hunks)
  • docs/БыстрыйСтарт.md (1 hunks)
  • docs/МониторингПамяти.md (1 hunks)
  • docs/Параметризация.md (1 hunks)
  • docs/СортировкаОтчета.md (1 hunks)
  • docs/Эталоны.md (2 hunks)
  • src/BenchmarkOneScript/core/Классы/СтатистикаБенчмарка.os (1 hunks)
  • tests/ТестыСтатистики.os (9 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
  • GitHub Check: sonar / test
  • GitHub Check: build (ubuntu-latest, stable)
  • GitHub Check: build (windows-latest, dev)
  • GitHub Check: build (ubuntu-latest, dev)
  • GitHub Check: build (macos-latest, stable)
  • GitHub Check: build (windows-latest, stable)
  • GitHub Check: build (macos-latest, dev)
  • GitHub Check: build (macos-latest, dev)
  • GitHub Check: build (windows-latest, stable)
  • GitHub Check: build (macos-latest, stable)
  • GitHub Check: sonar / test
🔇 Additional comments (10)
docs/МониторингПамяти.md (1)

38-42: Approve updated benchmark metrics.

The table values for Mean, StdErr, StdDev, Median, Op/s, and Allocated have been revised with improved precision and reflect the updated standard error calculation. Table alignment looks consistent.

README.md (1)

97-106: Confirm version bump and revised statistics.

The README example now shows v0.2.0 and updated numeric benchmarks (Mean, StdErr, StdDev, Ratio, Median, Op/s, Allocated). Formatting is consistent with other docs.

docs/БыстрыйСтарт.md (1)

71-79: Approve revised quick-start example.

The version number update to v0.2.0 and the refreshed benchmark metrics are correctly reflected, with tidy column spacing.

docs/СортировкаОтчета.md (1)

51-59: Approve updated sorting report table.

Revised Mean, StdErr, StdDev, Median, and Op/s values show improved precision. Table structure and alignment remain clear.

docs/Параметризация.md (1)

38-47: Approve updated parameterization table.

The numeric values for Mean, StdErr, StdDev, Median, and Op/s have been updated in line with the new statistical logic. Column headers are well aligned.

src/BenchmarkOneScript/core/Классы/СтатистикаБенчмарка.os (1)

75-77: Correct fix for standard error calculation.

The code now properly calculates КоличествоИтераций based on the filtered time measurements rather than the full dataset. This ensures that standard error calculation in lines 83-86 uses the correct sample size, fixing the issue mentioned in the PR title.

docs/Эталоны.md (2)

40-44: Updated benchmark statistics table with corrected values.

The updated benchmark table reflects the corrected statistics calculation, particularly for standard error, with improved formatting for aligned spacing and consistent decimal places.


82-87: Updated benchmark statistics table with categories and corrected values.

The category benchmark table has been updated with corrected statistics values following the fix to standard error calculation.

tests/ТестыСтатистики.os (2)

10-10: Updated test function calls to match new signature.

Test calls now correctly pass separate string parameters for time and memory measurements to align with the modified ТаблицаЗамеров function signature.

Also applies to: 24-24, 47-47, 70-70, 93-93, 118-118, 144-144, 168-168


189-212: Well-structured implementation of separated measurements.

The ТаблицаЗамеров function has been redesigned to separately handle time and memory measurements, creating a clear distinction between the two measurement types. The implementation correctly:

  1. Creates a table with appropriate columns
  2. Handles both time and memory measurements separately
  3. Assigns the correct stage type to each measurement
  4. Applies the multiplier consistently

This change aligns perfectly with the core statistics class modification and ensures accurate calculation of statistics.

@sonar-openbsl-ru-qa-bot
Copy link

@Stivo182 Stivo182 merged commit 4f75c26 into main May 13, 2025
18 of 20 checks passed
@Stivo182 Stivo182 deleted the fix/stderr branch May 13, 2025 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant